>>> import re >>> name = "Barack (of Washington)" >>> re.sub('[(){}<>\']', '', name) >>> print(name) Barack of Washington
import re print(re.sub("e|l", "", "Hello people")) "Ho pop"